<?php
namespace App\Params\Backend;
use App\Params\Param;
/**
 * 优惠券保存参数
 *
 * @author: WangBin
 * @date: 2021/7/26
 * @mail: <849850352@qq.com>
 */
class CouponUpdateParam extends Param
{
    public $coupon_id = 0;
    public $store_id = 0;
    public $name;
    public $time_range;
    public $is_active = 1;
    public $platform;
    public $total_num;
    public $coupon_type;
    public $amount;
    public $discount;
    public $customer_type;
    public $goods_type;
    public $intro;

    public function rules()
    {
        return [
            'coupon_id' => 'nullable|integer',
            'name' => 'required|string',
            'is_active' => 'boolean',
            'time_range' => 'required|array',
            'store_id' => 'nullable|integer',
            'platform' => 'required|array',
            'total_num' => 'required|integer',
            'coupon_type' => 'required|string',
            'amount' => 'required|numeric|min:1',
            'discount' => 'required|numeric|min:0',
            'customer_type' => 'required|string',
            'goods_type' => 'required|string',
            'intro' => 'required|string',
        ];
    }

    /**
     * @return int
     */
    public function getCouponId(): int
    {
        return $this->coupon_id;
    }

    /**
     * @param int $coupon_id
     */
    public function setCouponId(int $coupon_id): void
    {
        $this->coupon_id = $coupon_id;
    }

    /**
     * @return int
     */
    public function getStoreId(): int
    {
        return $this->store_id;
    }

    /**
     * @param int $store_id
     */
    public function setStoreId(int $store_id): void
    {
        $this->store_id = $store_id;
    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param mixed $name
     */
    public function setName($name): void
    {
        $this->name = $name;
    }

    /**
     * @return mixed
     */
    public function getTimeRange()
    {
        return $this->time_range;
    }

    /**
     * @param mixed $time_range
     */
    public function setTimeRange($time_range): void
    {
        $this->time_range = $time_range;
    }

    /**
     * @return int
     */
    public function getIsActive(): int
    {
        return $this->is_active;
    }

    /**
     * @param int $is_active
     */
    public function setIsActive(int $is_active): void
    {
        $this->is_active = $is_active;
    }

    /**
     * @return mixed
     */
    public function getPlatform()
    {
        return $this->platform;
    }

    /**
     * @param mixed $platform
     */
    public function setPlatform($platform): void
    {
        $this->platform = $platform;
    }

    /**
     * @return mixed
     */
    public function getTotalNum()
    {
        return $this->total_num;
    }

    /**
     * @param mixed $total_num
     */
    public function setTotalNum($total_num): void
    {
        $this->total_num = $total_num;
    }

    /**
     * @return mixed
     */
    public function getCouponType()
    {
        return $this->coupon_type;
    }

    /**
     * @param mixed $coupon_type
     */
    public function setCouponType($coupon_type): void
    {
        $this->coupon_type = $coupon_type;
    }

    /**
     * @return mixed
     */
    public function getAmount()
    {
        return $this->amount;
    }

    /**
     * @param mixed $amount
     */
    public function setAmount($amount): void
    {
        $this->amount = $amount;
    }

    /**
     * @return mixed
     */
    public function getDiscount()
    {
        return $this->discount;
    }

    /**
     * @param mixed $discount
     */
    public function setDiscount($discount): void
    {
        $this->discount = $discount;
    }

    /**
     * @return mixed
     */
    public function getCustomerType()
    {
        return $this->customer_type;
    }

    /**
     * @param mixed $customer_type
     */
    public function setCustomerType($customer_type): void
    {
        $this->customer_type = $customer_type;
    }

    /**
     * @return mixed
     */
    public function getGoodsType()
    {
        return $this->goods_type;
    }

    /**
     * @param mixed $goods_type
     */
    public function setGoodsType($goods_type): void
    {
        $this->goods_type = $goods_type;
    }

    /**
     * @return mixed
     */
    public function getIntro()
    {
        return $this->intro;
    }

    /**
     * @param mixed $intro
     */
    public function setIntro($intro): void
    {
        $this->intro = $intro;
    }
}
